@isTest
public class MyTest {
	
    @TestSetup
    static void sdddd(){
        Student__c stu = new Student__c(Student_Name__c='小红',School_Fee__c = 19800);
        insert stu;
    }

    @isTest
    static void queryAccount() {

        Test.startTest();
        List<Student__c> stuList = [SELECT ID,NAME FROM STUDENT__C];
        Test.stopTest();
        System.debug('stuList size: ' + stuList.size());
        System.assertEquals(1, stuList.size());
    }

    @IsTest
    static void testPerson(){
        
        Test.startTest();
        // 测试属性的读写方法
        Person person = new Person();
        person.sname = 'John';
        System.assertEquals('Johnab', person.sname);

        Person person2 = new Person();
        person2.sname = 'Jim';
        System.assertEquals('Jimab', person2.sname);

        Test.stopTest();
        
    }
}